import { ACSubscriberHolder } from './ACSubscriberHolder';

export class ACSubscriberHolderSet {
  private holderSet: Set<ACSubscriberHolder> = new Set<ACSubscriberHolder>();

  store(holder: ACSubscriberHolder) {
    this.holderSet.add(holder);
  }

  cancelAll() {
    for (let holder of this.holderSet) {
      holder.cancelSubscribe();
    }
  }
}